package com.cib.xagcjs.utils;

import com.cib.xagcjs.common.EcnyResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Description: 组装响应工具类
 * Author: jingcaiqi1225@gmail.com
 * Date: 2024/2/22 13:41
 */
@Slf4j
@Component
public class ResponseUtil {
    /**
     * 获取组装报文方法
     * @return 组装后的响应报文
     */
    public String getResponse(String transId, String status, String failReason) {
        EcnyResponse response = new EcnyResponse();
        response.setTransId(transId);
        response.setStatus(status);
        response.setFailReason(failReason);
        return String.valueOf(response);
    }
}
